<template>
  <el-row
    :class="['p-4', `--box`]"
    type="flex"
    :gutter="10"
    style="max-height: 800px"
  >
    <el-col :xl="6" :lg="24" :md="24" style="margin-bottom: 10px">
      <ConfigLeftTree ref="leftTree" @select="onTreeSelect" />
    </el-col>
    <el-col :xl="18" :lg="24" :md="24" style="margin-bottom: 10px">
      <div style="height: 100%; background-color: white">
        <!--引用表格-->
      </div>
    </el-col>
  </el-row>
</template>

<script lang="ts" setup>
import { ref } from "vue";
import ConfigLeftTree from "./components/ConfigLeftTree.vue";

// 给子组件定义一个ref变量
const leftTree = ref();

// 当前选中的部门code
const selectedRow = ref("");

// 左侧树选择后触发
function onTreeSelect(data) {
  selectedRow.value = data.orgCode;
}
</script>

<style lang="scss" scoped>
@use "./index.less";
</style>
